<template>
    <router-view v-slot="{ Component }">
        <keep-alive :include="keepAliveStore.includes"
                    :exclude="keepAliveStore.excludes">
            <component :is="Component"/>
        </keep-alive>
    </router-view>
</template>

<script setup lang="ts">

    defineOptions({
        name: 'com-keep-alive-router-view'
    })

    //region # 属性

    // 应用实例
    const { proxy }:any = getCurrentInstance()

    // KeepAlive 仓储
    const keepAliveStore = proxy.$storage.pinia.keepAlive

    //endregion

</script>